package net.tarine.gastronomi.server.model;

import java.io.Serializable;
import java.util.List;

import javax.jdo.annotations.Element;
import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Order;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable(detachable = "true")
public class Gas implements IsSerializable, Serializable {
	private static final long serialVersionUID = 3225117168352407759L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String id;
	@Persistent
	private String name;
	@Persistent
	private String emailSmtp;
	@Persistent
	private String emailAddress;
	@Persistent
	private String emailPassword;
	@Persistent(mappedBy = "gas")
	@Order(extensions = @Extension(vendorName = "datanucleus", key = "list-ordering", value = "modifiedDt desc"))
	@Element(dependent = "true")
	private List<ForumThread> forumThreadList;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmailSmtp() {
		return emailSmtp;
	}

	public void setEmailSmtp(String emailSmtp) {
		this.emailSmtp = emailSmtp;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getEmailPassword() {
		return emailPassword;
	}

	public void setEmailPassword(String emailPassword) {
		this.emailPassword = emailPassword;
	}

	public List<ForumThread> getForumThreadList() {
		return forumThreadList;
	}

	public void setForumThreadList(List<ForumThread> forumThreadList) {
		this.forumThreadList = forumThreadList;
	}

}
